package org.mdrtwell.reflection.dynamicproxy;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class DynamicSubject implements InvocationHandler {
	private Object	obj;

	public DynamicSubject(Object o) {
		this.obj = o;
	}

	public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
		System.out.println("before method");
		Object rs = method.invoke(obj, args);
		System.out.println("after method");
		return rs;
	}
}
